<?php
	session_start();
	include("/var/www/html/vivencias/conexaoBD.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Experi&ecirc;ncias do Processo de Adoecimento</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="vivencias.css" rel="stylesheet" type="text/css">
</head>

<body bgcolor="f6fafe">
<div align="center">
  <table width="300" border="0">
    <tr>
      <td align="center" valign="top"> <table width="95%" border="0" cellpadding="5" cellspacing="1">
          <tr> 
            <td align="center" valign="middle" bgcolor="d5e1ee"> 
              <table width="100%" border="0" cellpadding="5" cellspacing="1" bgcolor="#FFFFFF">
                <tr align="center" bgcolor="#38708F" class="texttab"> 
                  <td width="93%" align="left" valign="top" bgcolor="83b3e3"> 
                    <span class="ativo">Usu&aacute;rio(s) Online</span></td>
                  <td width="7%" align="right" valign="top" bgcolor="83b3e3">
<div align="right"><a href="javascript:void(0);" onClick="javascript:var objWindow = window.open(location.href, '_self');objWindow.close();"><img src="imagens/x.jpg" width="21" height="21" border="0"></a></div></td>
                </tr>
                <!--<tr align="center" bgcolor="d5e1ee" class="texttab"> 
                  <td colspan="2" align="left" valign="top" class="texto2"><strong>Enviar 
                    coment&aacute;rio</strong></td>
                </tr>-->
                <tr align="center" bgcolor="d5e1ee" class="texttab"> 
		  <td colspan="2" align="left" valign="top" class="texto2"> 
		  <?php
			$query     = "SELECT chatUsuariosOnline.idUsuario,usuarios.nome FROM chatUsuariosOnline,usuarios WHERE chatUsuariosOnline.idUsuario=usuarios.idUsuario AND idCurso='".$_SESSION['idCurso']."' ORDER BY nome";
			$resultado = mysql_query($query,$conexao);
			while($objeto = mysql_fetch_object($resultado)){
				echo $objeto->nome;
				echo '<br />';
			}                  
		  ?>
		  </td>
                </tr>
              </table>
            </td>
          </tr>
          <tr> 
            <td>&nbsp;</td>
          </tr>
         
        </table>
        <p align="center">&nbsp;</p>
        <p><br>
        </p>
        </td>
    </tr>
  </table>
  <p>&nbsp;</p>
  </div>
</body>
</html>
